package com.bbb.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bbb.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper extends BaseMapper<User> {
//登录
    @Select("select * from user where id=#{id} and password=#{password}")
    User login(User user);

    @Update("update user set name = #{name},age = #{age}, tel = #{tel},password = #{password}, avatar = #{avatar} where id = #{id}")
    int update(User user);

}
